Display DB multiple times in succession

I have one DB that contains a listView of objects that have errors (certain attributes were set incorrectly) and I want to allow the user to select more than one item to fix.  When the user selects >1 item, I want to have a related DB to display.

 

For example, our modules have an attribute named "*ObjectType" that is an enumerated type containing values of Text, Requirement, and Figure.  (There are other types, but for simplicity, I'll just show these)  For a Requirement, it must have the word 'shall' in it, otherwise, if it's not an image, then it should have a type of Text.

When they want to fix an object, they select the item from the listView and click an 'Edit' button.  The Edit button then displays a secondary DB containing a drop-down of the available object types and a text box filled with the text of the object and a Save button to save the changes.  Now, I'd like to give users the ability to select multiple items in the list and display each selected object in succession for the user to make their changes rather than making them select each one separately.  I thought I had it figured out, but instead of waiting for the completion of one object, it tries to display all the errors at once.  The reason I know this is that the infoBox appears one after the other.

Here is my code:

void fixIssues(DBE dbe) {
    for itemSel in dbeListOfIssues do {
        for (n=0; n<noElems(dbeListofIssues); n++) {
            if (get(dbeListofIssues, n) == itemSel) {
                //List has 2 columns (id and issue)
                sIssue = getColumnValue(dbeListOfIssues, n, 1);
                break;
            }
        }
        absNum = intOf(itemSel);
        showObjTypeError(absNum, sIssue);
        infoBox("Issue fixed");
    }
}

The function showObjTypeError displays the secondary DB.  To see the full DXL script, I've attached a file called Object_Type_Wizard.dxl which includes all of the commands used to set up each DB.

The crux of the issue is how to have the dialog box display one error at a time.

 

Chris


chrscote - Fri Jan 05 12:43:10 EST 2018

Re: Display DB multiple times in succession
O.Wilkop - Mon Jan 08 07:16:35 EST 2018

Look up block(db) and release(db) to show a db and stop execution of further code until release is called(ideally in a button callback)